package i18n;

import java.text.DateFormat;
import java.text.NumberFormat;
import java.util.Date;
import java.util.Locale;
import java.util.ResourceBundle;

public class Test {

    public static void main(String[] args) {


        Date date=new Date();

        System.out.println(date);

        DateFormat dateFormat=DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL);

        System.out.println(dateFormat.format(date));

        double d=2123556565645.48;

        NumberFormat numberFormat=NumberFormat.getNumberInstance();

        System.out.println(numberFormat.format(d));

        numberFormat=NumberFormat.getCurrencyInstance();

        System.out.println(numberFormat.format(d));


        // ResourceBundle rb=ResourceBundle.getBundle("i18n/resource");
        ResourceBundle rb=ResourceBundle.getBundle("i18n.resource");

        String a=rb.getString("a");

        System.out.println("a = " + a);



        // Locale locale=Locale.getDefault();
        //
        // System.out.println(locale.getCountry()+" "+locale.getLanguage());

        // Locale[] locales=Locale.getAvailableLocales();
        //
        // for (Locale locale : locales) {
        //     System.out.println(locale.getCountry()+" "+locale.getLanguage());
        // }


    }

}
